﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using FreesenseSubAIS.Core;

namespace FreesenseSubAIS
{
    public partial class ParamTabelPage :TabPage , IRefresh//   UserControl
    {
        public ParamTabelPage()
        {
            InitializeComponent();
        }
        public void SetSourcce(InspGroupParameter gp)
        {
            try
            {
                propertyGrid1.SelectedObject = gp.Sp;
                Text = gp.ToString();
                propertyGrid2.SelectedObject = gp;
                RefreshProperty();
            }
            catch (Exception ex)
            {

            }
        }
        public void RefreshProperty()
        {
            propertyGrid1.ExpandAllGridItems();
            propertyGrid1.Refresh();
            propertyGrid2.ExpandAllGridItems();
            propertyGrid2.Refresh();
        }
    }
}
